# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=baobab
pkgver=44.0
pkgrel=1
pkgdesc="A graphical directory tree analyzer"
url="https://wiki.gnome.org/Apps/DiskUsageAnalyzer"
arch=(x86_64)
license=(GPL2)
depends=(
  dconf
  gsettings-desktop-schemas
  gtk4
  libadwaita
  librsvg
)
makedepends=(
  appstream-glib
  git
  gobject-introspection
  meson
  vala
  yelp-tools
)
groups=(gnome)
_commit=13681aee6a35c8d4f98fa7a92736ffb6dc757e0f  # tags/44.0^0
source=(
  "git+https://gitlab.gnome.org/GNOME/baobab.git#commit=$_commit"
  no-mimetype.diff
)
b2sums=('SKIP'
        '71e04f307e842fa0676f5b64f55e8be908e3075a9b948a6ab3979b51a8db08fdd07c0f214adb74d5461b4f175a14a7bf9867cf2c9b044660a5b46bc8ea296a22')

pkgver() {
  cd baobab
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd baobab

  # https://bugs.archlinux.org/task/31861
  git apply -3 ../no-mimetype.diff
}

build() {
  arch-meson baobab build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
